package com.blog.dao.adminbloggers;

import java.util.List;

import com.blog.dao.conn.BaseDao;
import com.blog.entity.AdminBlogerEntity;
import com.blog.entity.BlogerConditionEntity;

public class AdminBlogerDao extends BaseDao{
	/**
	 * 1.查询根据条件查询
	 */
	public List<AdminBlogerEntity> getBloger(BlogerConditionEntity entity){
		StringBuffer bf=new StringBuffer("select user_id,user_name,user_image,user_ragtime,user_email,user_status from tb_user where user_status=");
		bf.append(entity.getStatus());
		if(entity.getEndTime()!=null) {
			bf.append(" and user_ragtime<").append(entity.getEndTime());
		}
		if(entity.getStartTime()!=null) {
			bf.append(" and user_ragtime>").append(entity.getStartTime());
		}
		if(entity.getKey()!=null) {
			bf.append(" and user_name like '%").append(entity.getKey()).append("%'");
		}
		queryList(bf.toString(),BlogerConditionEntity.class );
		return null;
	}
}
